package cn.liulingfengyu.creationmode.builderpattern;

/**
 * 建造者模式示例
 */
public class BuilderPatternDemo {
    public static void main(String[] args) {
        // 创建具体建造者
        Builder builder = new ConcreteBuilder();

        // 创建指挥者并指定建造者
        Director director = new Director(builder);

        // 构建产品
        director.construct();

        // 获取产品并展示
        Product product = builder.getResult();
        product.show();
    }
}